DROP TABLE CRST_AR_ADJUSTMENTS_ALL;

CREATE TABLE CRST_AR_ADJUSTMENTS_ALL
(
  ADJUSTMENT_ID                   NUMBER(15)    NOT NULL,
  LAST_UPDATED_BY                 NUMBER(15)    NOT NULL,
  LAST_UPDATE_DATE                DATE          NOT NULL,
  LAST_UPDATE_LOGIN               NUMBER(15),
  CREATED_BY                      NUMBER(15)    NOT NULL,
  CREATION_DATE                   DATE          NOT NULL,
  AMOUNT                          NUMBER        NOT NULL,
  APPLY_DATE                      DATE,
  GL_DATE                         DATE          NOT NULL,
  SET_OF_BOOKS_ID                 NUMBER(15)    NOT NULL,
  CODE_COMBINATION_ID             NUMBER(15),
  TYPE                            VARCHAR2(15 BYTE) NOT NULL,
  ADJUSTMENT_TYPE                 VARCHAR2(3 BYTE) NOT NULL,
  STATUS                          VARCHAR2(30 BYTE) NOT NULL,
  LINE_ADJUSTED                   NUMBER,
  FREIGHT_ADJUSTED                NUMBER,
  TAX_ADJUSTED                    NUMBER,
  RECEIVABLES_CHARGES_ADJUSTED    NUMBER,
  ASSOCIATED_CASH_RECEIPT_ID      NUMBER(15),
  CHARGEBACK_CUSTOMER_TRX_ID      NUMBER(15),
  BATCH_ID                        NUMBER(15),
  CUSTOMER_TRX_ID                 NUMBER(15),
  CUSTOMER_TRX_LINE_ID            NUMBER(15),
  SUBSEQUENT_TRX_ID               NUMBER(15),
  PAYMENT_SCHEDULE_ID             NUMBER(15),
  RECEIVABLES_TRX_ID              NUMBER(15),
  DISTRIBUTION_SET_ID             NUMBER(15),
  GL_POSTED_DATE                  DATE,
  COMMENTS                        VARCHAR2(2000 BYTE),
  AUTOMATICALLY_GENERATED         VARCHAR2(1 BYTE),
  CREATED_FROM                    VARCHAR2(30 BYTE) NOT NULL,
  REASON_CODE                     VARCHAR2(30 BYTE),
  POSTABLE                        VARCHAR2(1 BYTE),
  APPROVED_BY                     NUMBER(15),
  ATTRIBUTE_CATEGORY              VARCHAR2(30 BYTE),
  ATTRIBUTE1                      VARCHAR2(150 BYTE),
  ATTRIBUTE2                      VARCHAR2(150 BYTE),
  ATTRIBUTE3                      VARCHAR2(150 BYTE),
  ATTRIBUTE4                      VARCHAR2(150 BYTE),
  ATTRIBUTE5                      VARCHAR2(150 BYTE),
  ATTRIBUTE6                      VARCHAR2(150 BYTE),
  ATTRIBUTE7                      VARCHAR2(150 BYTE),
  ATTRIBUTE8                      VARCHAR2(150 BYTE),
  ATTRIBUTE9                      VARCHAR2(150 BYTE),
  ATTRIBUTE10                     VARCHAR2(150 BYTE),
  POSTING_CONTROL_ID              NUMBER(15)    DEFAULT -3 NOT NULL,
  ACCTD_AMOUNT                    NUMBER        NOT NULL,
  ATTRIBUTE11                     VARCHAR2(150 BYTE),
  ATTRIBUTE12                     VARCHAR2(150 BYTE),
  ATTRIBUTE13                     VARCHAR2(150 BYTE),
  ATTRIBUTE14                     VARCHAR2(150 BYTE),
  ATTRIBUTE15                     VARCHAR2(150 BYTE),
  PROGRAM_APPLICATION_ID          NUMBER(15),
  PROGRAM_ID                      NUMBER(15),
  PROGRAM_UPDATE_DATE             DATE,
  REQUEST_ID                      NUMBER(15),
  ADJUSTMENT_NUMBER               VARCHAR2(20 BYTE) NOT NULL,
  ORG_ID                          NUMBER(15),
  USSGL_TRANSACTION_CODE          VARCHAR2(30 BYTE),
  USSGL_TRANSACTION_CODE_CONTEXT  VARCHAR2(30 BYTE),
  DOC_SEQUENCE_VALUE              NUMBER(15),
  DOC_SEQUENCE_ID                 NUMBER(15),
  ASSOCIATED_APPLICATION_ID       NUMBER(15),
  CONS_INV_ID                     NUMBER(15),
  MRC_GL_POSTED_DATE              VARCHAR2(2000 BYTE),
  MRC_POSTING_CONTROL_ID          VARCHAR2(2000 BYTE),
  MRC_ACCTD_AMOUNT                VARCHAR2(2000 BYTE),
  ADJ_TAX_ACCT_RULE               VARCHAR2(3 BYTE),
  GLOBAL_ATTRIBUTE_CATEGORY       VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE1               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE2               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE3               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE4               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE5               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE6               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE7               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE8               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE9               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE10              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE11              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE12              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE13              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE14              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE15              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE16              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE17              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE18              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE19              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE20              VARCHAR2(150 BYTE),
  LINK_TO_TRX_HIST_ID             NUMBER(15),
  ADJUSTMENT_ID_N                 NUMBER(15)
);
